/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test_app;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author assa
 */
public class Test_app {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("Start!");
 //       Test_app test_app = new Test_app();
        Sql_helper sql_helper = new Sql_helper();
        Yandex_helper yandex = new Yandex_helper();
        while (true) {
        for (String link : yandex.get_links()) {
            sql_helper.write_to_db(link);
        }
            try {
                TimeUnit.SECONDS.sleep(60);
            } catch (InterruptedException ex) {
                Logger.getLogger(Test_app.class.getName()).log(Level.SEVERE, null, ex);
            }
        yandex.get_page();
        }
    }

}
